VHD Attach

Illustration

This is small tool that adds Attach and Detach option to contextual (aka right-click) menu of Virtual disk (vhd) files. That enables those operations to be done without trip to Disk Management console. Detach option is available on hard drive contextual menu also (if selected in options).

If so desired you can also use this program to attach various virtual disks upon system start-up. It is your choice whether this will be done in full-access or read-only mode.

Additionally program can be used as classic utility in order to see various information about virtual disk, even without attaching it.

Do notice that this program only works with Windows 7, Windows Server 2008 R2, and above. Older operating systems are not supported. And yes, it does work on Windows 10.

P.S. If you are using Windows 8 or Windows Server 8 you can also mount ISO images and new VHDX virtual disks.


FAQ

VHD cannot be attached when stored in a network location.

VHD Attach service properties

Most probable reason for this is that Local Service has no rights on network location.

Easiest solution is to go into Computer Management -> Services and Applications -> Services and there find “VHD Attach” service. Right-click properties and then go to Log On tab. Instead of Local System account select This account and fill your user data.

After service restart you should be able to attach from network location also.

If I auto-attach BitLocker enabled drive, I get no password prompt.

VHD Attach - Shortcut dialog

This happens because VHD Attach auto-mounting happens when service is started and this is usually before user interface is even shown. BitLocker shows password dialog only when drive appears and not at later time.

Workaround is not to auto-mount such drives at all.

  1. Make a shortcut to VHDAttach.exe (found in C:\Program Files\Josip Medved\VHD Attach by default).
  2. Right-click on created shortcut and select Properties. Under target text append /attach “whatevernameofdiskis.vhd”.
  3. Open Windows Start menu ( key), right-click All programs and select open there.
  4. Navigate to Programs, Startup and move shortcut there.

Now when user logs on, VHD will be attached. Since there is user interface, BitLocker will ask for password.

P.S. Do not forget to remove that disk from auto-mounted list. Otherwise system will mount disk anyhow and all this is for nothing.

Will this program work on Windows Vista?

I am afraid not, as API needed for program to function is available only in Windows 7 and later.

I get message “Windows SmartScreen prevented an unrecognized app from starting. Running this app might put your PC at risk.” Is there something wrong?

Windows 8 annoyance

Everything is ok, Microsoft is just practicing being annoying. One Vista was not enough…

Click on “More info” and then select “Run anyway”.

How do I perform automated install?

You can use /VERYSILENT parameter with VHD Attach installation in order to do no-questions-asked installation. This and many other command-line installation parameters come courtesy of InnoSetup.

Drives sometime don’t attach upon startup.

VHD Attach - Startup type - Automatic (delayed start)

This does sometime happen if service starts too fast. As a workaround you can force it to start with a delay.

Under Service, VHD Attach, Properties, General, Startup Type you can change startup type from Automatic to Automatic (Delayed start).

This usually resolves this issue but at the cost of slightly later disk mounting.

Windows Download